<extend name="Public/base" />

<block name="style">
    <link rel="stylesheet" type="text/css" href="__CSS__/order.css" media="all">
</block>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>秒杀商品管理</h2>
    </div>

    <div class="cf">
      <!--  <div class="fl">
            <button class="btn ajax-post confirm" target-form="ids" url="{:U('setStatus', array('status' => -1))}">删 除</button>
        </div>-->

        <!-- 高级搜索 -->
        <!--    <form id="J_search_form" action="{:U('index')}" method="GET">
              <div class="search-form fr cf">
                <div class="fl">
                  <div class="sleft">
                    <select name="type">
                      <option value="">请选择推广类型</option>
                      <option value="1">桌面商家</option>
                      <option value="2">普通推广</option>
                    </select>
                  </div>
                  <div class="sleft">
                    <input type="text" name="start_time" class="search-input w-100 date_select" value="{:I('get.start_time')}" placeholder="起始时间"/>
                    <span class="fl line-h">至</span>
                    <input type="text" name="end_time" class="search-input w-100 date_select" value="{:I('get.end_time')}" placeholder="今天"/>
                    <a class="sch-btn" href="javascript:;" id="J_search"><i class="btn-search"></i></a>
                  </div>
                </div>
              </div>
            </form>-->
    </div>
    <!-- 数据列表 -->



        <table class="order-table-head">
            <tr>
                <th width="30">
                    <input class="checkbox check-all" type="checkbox">
                </th>
                <th width="370" class="text-center">商品基本信息</th>
                <th width="140" class="text-center">售价</th>
                <th width="140" class="text-center">库存</th>
                <th width="140" class="text-center">秒杀价</th>
                <th width="140" class="text-center">状态</th>
                <th width="140" class="text-center">操作</th>
            </tr>
        </table>


            <notempty name="list">
                <volist name="list" key='key' id="vo">
                    <table class="order-table status-{$vo.status}">
                        <tr>
                            <td width="20" class="text-center">
                                <input name="ids[]" class="ids" type="checkbox" value="{$vo['id']}">
                            </td>
                            <td width="50" class="item-lists text-center">
                                <a href="{:U('/Item/detail?id='.$vo['id'])}" target="_blank"><img src="{:get_image_thumb(get_cover($vo['images'], 'path'), 60, 60)}" title="{$vo.title}"></a>
                            </td>
                            <td width="330">
                                <!-- <a href="{:U('edit?id='.$vo['id'])}"> -->
                                {$vo['name']}
                                <!-- </a> -->
                            </td>
                            <!--  <td width="90" class="text-center">
                               <input type="text" data-action="{:U('Join/setFieldValue')}" name="price" data-id="{$vo['id']}" title="修改售价" class="text text-right input-mini J_ajax_updatefield" value="{$vo.price}">
                               元
                             </td> -->
                            <td width="140" class="text-center">
                                {$vo.price}
                                元
                            </td>
                            <td width="140" class="text-center">
                                {$vo.stock}
                                件
                            </td>
                            <td width="140" class="text-center">
                                {$vo.item_price}
                                元
                            </td>

                            <td width="140" class="text-center">
                                <if condition="$vo['status'] eq 1">
                                    <span class="text-success">已通过</span>
                                </if>
                                <if condition="$vo['status'] eq 2">
                                    <span class="text-cancel">待审核</span>
                                </if>
                                <if condition="$vo['status'] eq 3">
                                    <span class="text-cancel">未通过</span>
                                </if>
                            </td>

                            <td width="140" class="text-center">
                                <a href="{:U('editItem?id='.$vo['id'].'&seckill_id='.$data['id'])}">[编辑]</a>
<!--
                                <a href="{:U('setItemStatus?status=-1&ids='.$vo['id'].'&seckill_id='.$data['id'])}" class="confirm ajax-get">[删除]</a>
-->
                            </td>
                        </tr>
                    </table>
                </volist>
                <else/>
                <div class="list-empty">
                    暂无商品！
                </div>
            </notempty>



    <div class="page">
        {$_page}
    </div>
</block>

<block name="script">
    <script language="javascript" type="text/javascript" src="__PUBLIC__/Admin/js/My97Date/WdatePicker.js"></script>
    <script type="text/javascript" charset="utf-8">
        //导航高亮
        highlight_subnav("{:U('Seckill/activity')}");
        Core.setValue('type', '{:I('get.type', '')}');
        //时间选择
        $('.date_select').focus(function(){
            WdatePicker({skin: 'twoer', dateFmt: 'yyyy-MM-dd', maxDate: '%y-%M-%d'});
        });
    </script>
</block>
